<div class="container type-c" style="width: 100%;height: 600px;">
  <div class="hd">
    <h3>数据预览</h3>
    <h5><button type="button" id="import_button" class="ncsc-btn" onclick="importGoods();">字段设定完成开始导入</button></h5>
  </div>
  <div class="content" style="overflow: auto;height: 550px;;margin-right: 2em;">
    <table class="ncsc-table-style" id="import_data">
      <thead>
      <tr>
        <th class="w20">&nbsp;&nbsp;</th>
        <?php foreach($output['fields'] as $index=>$filed){?>
            <th><?php echo $filed; ?>&nbsp;<a href="javascript:return delTableCel(<?php echo $index+1; ?>)">X</a></th>
        <?php }?>
      </tr>
      <tr id="goods_field_index">
        <th class="w20"></th>
        <?php foreach($output['fields'] as $index=>$filed){?>
          <th>
            <?php $goods_fields='<select><option value="">other</option>';$i=0;$isSelected=false;
            foreach($output['goods_fields'] as $k=>$v){
              $isSelected or $isSelected=$i==$index;
              $goods_fields.='<option value="'.$k.'"'.($i==$index?'selected':'').'>'.$v.'</option>';
              $i++;
            }
            $goods_fields.='</select>';
            ?>
            <?php echo $goods_fields?>
          </th>
        <?php }?>
      </tr>
      </thead>
      <tbody>
      <?php array_map(function($row){$row=str_getcsv($row);?>
        <tr class="bd-line" id="goods_<?php echo $row[0];?>">
          <td><a href="javascript:return delTableRow('<?php echo $row[0];?>');">X</a></td>
          <?php foreach($row as $index=>$item){?>
            <td><?php echo $item;?><input type="hidden" id="goods_<?php echo $row[0];?>_<?php echo $index+1;?>" value="<?php echo $item;?>"></td>
          <?php } ?>
        </tr>
      <?php },$output['data']);?>
      </tbody>
    </table>
  </div>
</div>